#{extends 'main.html' /}
#{set title:'Inactive Event Overview' /}
#{set 'moreScripts'}
    <script src="@{'/public/javascripts/jquery.dataTables.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
    <script>
        $(document).ready( function() {
            oTable = $('.eventTable').dataTable( {
            	"bSearchable": false,
            });
        });
    </script>
#{/set}

<a class="text" href="@{AdminInterface.showEvents()}">Show all events</a> 
<a class="text" href="@{AdminInterface.showInactiveEvents()}">Show inactive events</a> 
<a class="text" href="@{AdminInterface.showUsers()}">Show users</a><br>

<h2>Inactive Event overview</h2>
<table cellpadding="0" cellspacing="0" border="0" class="eventTable" id="eventTable">
	<thead>
	<tr><th>Name</th><th>Offers</th><th>activate</th></tr>
	</thead>
	<tbody>
	#{list events, as:'event'}
		<tr>
			<td><a href="@{Events.show(event.id)}">${event.name}</a></td>
			<td><a href="@{AdminInterface.showOffers(event.id)}">Show offers</td>
			<td><a href="@{Events.activate(event.id)}">activate</td>
		</tr>
	#{/list}
	</tbody>
</table>